package com.linln.proxy;

import com.linln.proxy.thread.ProxyThread;
import com.linln.proxy.utils.HttpClientInvok;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class MyHttpsProxy {
    Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private HttpClientInvok httpClientInvok;
    @PostConstruct
    public void  init() {
        logger.info("启动代理服务器");
        ProxyThread proxyThread = new ProxyThread(httpClientInvok);
        Thread threadInstance = new Thread(proxyThread);
        threadInstance.start();
        logger.info("启动代理服务器成功");
    }
}
